package com.example.studentsRoom.controller;


import com.example.studentsRoom.form.RuleForm;
import com.example.studentsRoom.service.impl.SystemAdminService;
import com.example.studentsRoom.vo.ResultVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author admin
 * @since 2022-07-19
 */
@RestController
@RequestMapping("/systemAdmin")
@Slf4j
public class SystemAdminController {

    @Autowired
    SystemAdminService systemAdminService;

    @GetMapping("/login")
    public ResultVo login(RuleForm ruleForm){
        ResultVo resultVo = systemAdminService.login(ruleForm);
        log.info("系统管理员{{}}",resultVo.getData());
        return resultVo;
    }
}

